use "c:\Data Sets\Africa\africa_1.dta", clear

gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_1flip.dta", replace

use "c:\Data Sets\Africa\africa_2.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_2flip.dta", replace

use "c:\Data Sets\Africa\africa_3.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_3flip.dta", replace

use "c:\Data Sets\Africa\africa_4.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_4flip.dta", replace

use "c:\Data Sets\Africa\africa_5.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_5flip.dta", replace

use "c:\Data Sets\Africa\africa_6.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_6flip.dta", replace

use "c:\Data Sets\Africa\africa_7.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_7flip.dta", replace

use "c:\Data Sets\Africa\africa_8.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_8flip.dta", replace

use "c:\Data Sets\Africa\africa_9.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_9flip.dta", replace

use "c:\Data Sets\Africa\africa_10.dta", clear
gen IMFnew=0
replace IMFnew=1 if imfstatu==0
replace imfstatu=IMFnew

replace IMFquota = imfstatu*quota
replace IMFParts = imfstatu*pmpty_s
replace IMFnump = imfstatu*num_coal
replace IMFseatl = imfstatu*seatlar
replace IMFParl2 = imfstatu*nxtpa_el 
replace IMFpol = imfstatu*polity
replace IMFUSA = imfstatu*us_aid
replace IMFchrsL = imfstatu*chrsL1
replace IMFchdcL = imfstatu*chdcL1
replace IMFcpiL = imfstatu*chcpiL1
replace IMFcpiL6 = imfstatu*chcpiL6
replace IMFpfall = pfall*imfstatu
replace IMFrfall = rfall*imfstatu

replace IMFanar = imfstatu*anarchy
replace IMFpcoup = imfstatu*pcoup
replace IMFcfa = imfstatu*cfa
replace IMFcolfr = imfstatu*col_fr
replace IMFcoluk = imfstatu*col_uk
replace IMFcmwth = imfstatu*cmwlth
replace IMFsunfr = imfstatu*sunfr
replace IMFfraid = imfstatu*franc_ai
replace IMFsunus = imfstatu*sunus
replace IMFusexp = imfstatu*USexp
replace IMFma3cpi=imfstatu*ma3cpi
replace IMFma3chdc=imfstatu*ma3chdc
replace IMFma3chrs=imfstatu*ma3chrs
replace IMFma3chex=imfstatu*ma3chex
replace IMFma5cpi=imfstatu*ma5cpi
replace IMFma5chdc=imfstatu*ma5chdc
replace IMFma5chrs=imfstatu*ma5chrs
replace IMFma5chex=imfstatu*ma5chex
replace IMFpcgdp=imfstatu*lagpcgdp
replace IMFcivwar=imfstatu*civ_war
replace IMFnoncfafr=imfstatu*noncfafr
replace IMFnoncmwuk=imfstatu*noncmwuk

replace IMFcpiL3=imfstatu*chcpiL3
replace IMFcpiL2=imfstatu*chcpiL2
replace IMFchdcL3=imfstatu*chdcL3
replace IMFchdcL2=imfstatu*chdcL2
replace IMFchrsL3=imfstatu*chrsL3
replace IMFchrsL2=imfstatu*chrsL2
replace IMFcherL3=imfstatu*cherL3
replace IMFcherL2=imfstatu*cherL2
replace IMFcurracc=imfstatu*currenta
replace IMFdebt=imfstatu*shortter

replace IMFpolxcoup=polxcoup*imfstatu
replace IMFchrsLneg=chrsLneg*imfstatu
replace IMFlogchrsLopp=logchrsLopp*imfstatu
replace IMFchdcLneg=chdcLneg*imfstatu
replace IMFlogchdcLopp=logchdcLopp*imfstatu
replace IMFchrs2neg=chrs2neg*imfstatu
replace IMFlogchrs2opp=logchrs2opp*imfstatu
replace IMFchdc2neg=chdc2neg*imfstatu
replace IMFlogchdc2opp=logchdc2opp*imfstatu
replace IMFchrs3neg=chrs3neg*imfstatu
replace IMFlogchrs3opp=logchrs3opp*imfstatu
replace IMFchdc3neg=chdc3neg*imfstatu
replace IMFlogchdc3opp=logchdc3opp*imfstatu
replace IMFlogchdc1=logchdc1*imfstatu
replace IMFlogchrs1=logchrs1*imfstatu
replace IMFlogchdc2=logchdc2*imfstatu
replace IMFlogchrs2=logchrs2*imfstatu
replace IMFlogchdc3=logchdc3*imfstatu
replace IMFlogchrs3=logchrs3*imfstatu

drop IMFnew

save "c:\Data Sets\Africa\africa_10flip.dta", replace

